import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'
import './plugins/element.js'
import './assets/css/common.css'
import jwt from 'jwt-decode'
//一进入读取本地数据
if(localStorage.getItem("ego")){
  store.commit("loginModule/setUser",{
    //存储本地数据
    username:jwt(localStorage.getItem("ego")).username,
    token:localStorage.getItem("ego")
  })
}

import './router/permission'
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
